// pages/chanel/chanel.js
var api = "https://forum.alexs.fun/json/"
Page({

	/**
	 * Page initial data
	 */
	data: {
		chanels: [
			"科普", "公开课", "人文", "技术宅", "野生技术协会", "汽车", "机械", "考试", "用于", "科学", "历史", "数学", "日语"
		],
		hhhhhh: [],
		llllll: []
	},

	/**
	 * getHotList
	 */
	getHotList: function (e) {
    var that = this;
    wx.request({
      url: api + e,
      method: "GET",
      success(res) {
        that.setData({
          hhhhhh: res.data
        })
      }
    })
	},
	getLiveList: function (e) {
    var that = this;
    wx.request({
      url: api + e,
      method: "GET",
      success(res) {
        that.setData({
          llllll: res.data
        })
      }
    })
  },

	/**
	 * Lifecycle function--Called when page load
	 */
	onLoad: function (options) {
		this.getHotList("hotList.json")
		this.getLiveList("liveList.json")
	},

	/**
	 * Lifecycle function--Called when page is initially rendered
	 */
	onReady: function () {
		
	},

	/**
	 * Lifecycle function--Called when page show
	 */
	onShow: function () {

	},

	/**
	 * Lifecycle function--Called when page hide
	 */
	onHide: function () {

	},

	/**
	 * Lifecycle function--Called when page unload
	 */
	onUnload: function () {

	},

	/**
	 * Page event handler function--Called when user drop down
	 */
	onPullDownRefresh: function () {

	},

	/**
	 * Called when page reach bottom
	 */
	onReachBottom: function () {

	},

	/**
	 * Called when user click on the top right corner to share
	 */
	onShareAppMessage: function () {

	}
})